package com.syg.SpringMVC._03_SpringMVC_Id_name;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 多个请求url对应一个控制器(id和name可以同时存在)
 */
public class _01_SpringMVC_id_name implements Controller {

    @Override
    public ModelAndView handleRequest(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("javaValue","操作用户成功");
        modelAndView.setViewName("JspPage/_03_SpringMVC_Id_name/_03_SpringMVC_Id_name.jsp");
        return modelAndView;
    }
}
